<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="tag" uri="surveyonline-taglib" %> 

<%@ page import="fr.univ.surveyonline.model.allEnum.Categorie" %>
<%@ page import="fr.univ.surveyonline.model.allEnum.Region" %>
<%@ page import="java.util.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
    <title><tag:languageTag id="title"/></title>
	<%@ include file="/layout/head.tag" %>
	  <script type='text/javascript' src='js/check-actions/main.js'></script>
</head>
<body>

<div id="global">
	<div id="entete">
		<%@ include file="/layout/menu.tag" %>
	</div>
	<div id="contenu">
		<h2><tag:languageTag id="title"/></h2>

		<p>
			<tag:languageTag id="index_desc"/>
			<br/><tag:languageTag id="index_desc_2"/>
			<br/><br/><tag:languageTag id="index_desc_3"/>
			
		</p>
		<span id="error" style="margin-left:400px;color:#BE2F00">
		<% if (request.getAttribute("messageInscription") != null) {
				out.print(request.getAttribute("messageInscription")); 
			}
		%>	
		</span>
			<form name="profil_form" action="#" onsubmit="check_inscription();return false;" method="post" name="formulaire">
		<div style="float:left">
			<img src="images/user_info.png" alt="user" style="margin-left:50px;margin-top:60px"/>	
			<br/><br/><br/><br/>
			<input type="submit" style="margin-left:180px"
				value=<tag:languageTag id="index_validate"/> />
		</div>
		<div style=" float:right;width: 400px; padding: 2em; display: block; text-align: left;">
		
			
				<div id="form_id">
				<h3 style="padding-left:100px;"><tag:languageTag id="index_ident"/></h3>
				<ul>
					<li>
						<p>
							<label style="color:white"><tag:languageTag id="index_log"/></label>
							<input id="login" name="login" type="text" size="22"/>
						</p>
					</li>
					<li>
						<p>
							<label style="color:white"><tag:languageTag id="index_password"/></label>
							<input id="password" name="password" type="password" size="22"/>
						</p>
					</li>
					<li>
						<p>
							<label style="color:white"><tag:languageTag id="index_password2"/></label>
							<input id="password2" name="password2" type="password" size="22"/>
						</p>
					</li>
				</ul>
				</div>
				<div id="form_info">
				<h3 style="padding-left:100px;"><tag:languageTag id="index_who"/></h3>
				<ul>
					<li>
						<p>
							<label><tag:languageTag id="index_firstname"/></label>
							<input id="firstname" name="firstname" type="text" size="22"/>
						</p>
					</li>
					<li>
						<p>
							<label><tag:languageTag id="index_lastname"/></label>
							<input id="lastname" name="lastname" type="text" size="22"/>
						</p>
					</li>
					<li>
						<p>
							<label><tag:languageTag id="index_birth"/><br/><tag:languageTag id="index_birth_2"/></label>
							<input id="day" name="day" type="text" size="2" /> / <input id="month" name="month" type="text" size="2" /> / <input id="year" name="year" type="text"  size="4" />
						</p>
					</li>
					<li>
						<p>
							<label><tag:languageTag id="index_sexe"/></label>
							<input type="radio" name="sexe" value="Homme" checked="checked"/> <tag:languageTag id="index_sexe_m"/>
							<input type="radio" name="sexe" value="Femme"/> <tag:languageTag id="index_sexe_f"/>
						</p>
					</li>
					<li>
						<p>
							<label><tag:languageTag id="index_cat"/></label>
							<select name="categorie" id="categorie">
							<% Categorie[] categories = Categorie.values();
								boolean isFirst = true;
								for (Categorie categorie : categories) {
									if (isFirst) {
										out.print("<option selected value="+categorie.name()+">" + categorie + "</option>");									
									} else {
										out.print("<option value="+categorie.name()+">" + categorie + "</option>");	
									}
									isFirst = false;
								}%>
							</select> 
						</p>
					</li>
					<li>
						<p>
							<label><tag:languageTag id="index_country"/></label>
							<select name="region" id="region">
							<% Region[] regions = Region.values();
								isFirst = true;
								for (Region region: regions) {
									if (isFirst) {
										out.print("<option selected value="+region.name()+">" + region + "</option>");									
									} else {
										out.print("<option value="+region.name()+">" + region + "</option>");	
									}
									isFirst = false;
								}%>
							</select> 
						</p>
					</li>
				</ul>
				</div>
				<div id="form_contact">
				<h3 style="padding-left:100px;"><tag:languageTag id="index_contact"/></h3>
				<ul>
					<li>
						<p>
							<label><tag:languageTag id="index_email"/></label>
							<input id="mail" name="mail" type="text" size="22"/>
						</p>
					</li>
				</ul>
				</div>
		</div>
		
		
		
		</form>
		
		<div class="clear"></div>
	</div>
	<div id="pied">
		<%@ include file="/layout/pied.tag" %>
	</div>
</div>

</body>
</html>